import request from '@/utils/request'
const api_name = '/edu/service/teacher'
export default {
  // 讲师列表 按条件查询
  getTeacherListPage(current, limit, teacherQueryVO) {
    return request({
      url: `${api_name}/pageTeacherCondition/${current}/${limit}`,
      method: 'post',
      // data表示对象转换成json传递到接口里面
      data: teacherQueryVO
    })
  },
  // 通过Id删除讲师
  deleteTeacherById(id) {
    return request({
      url: `${api_name}/delete/${id}`,
      method: 'delete'
    })
  },
  // 保存讲师
  saveTeacher(teacher) {
    return request({
      url: `${api_name}/addTeacher`,
      method: 'post',
      data: teacher
    })
  },
  // 根据Id查询教师
  getTeacherById(id) {
    return request({
      url: `${api_name}/getTeacher/${id}`,
      method: 'get'
    })
  },
  // 修改教师
  updateTeacherInfo(teacher) {
    return request({
      url: `${api_name}/updateTeacher`,
      method: 'post',
      data: teacher
    })
  }
}
